package com.itlong.cloud.user.operate;

import com.itlong.cloud.POJO.DTO.operate.OperateUserManagePageDTO;
import com.itlong.cloud.POJO.VO.operate.OperateActiveUserVO;
import com.itlong.cloud.POJO.VO.operate.OperateUserManageVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


/**
 * <desc>
 *      运营—APP用户-用户管理业务处理暴露接口。
 * <desc/>
 *
 * @createDate 2017/9/21.
 */
@FeignClient(name = "user-service")
public interface IOperateUserManageServiceClient {

     /**
      * <desc>
      *     根据用户ID获取用户信息。
      * <desc/>
      *
      * @param  userId 用户
      * @return
      * @author shengen.T
      * @createDate 2017/9/21
      */
     @RequestMapping(path = "/appUser/userManage/getUserInfo/{userId}")
     OperateUserManageVO getUserInfo(@PathVariable(value = "userId") String userId);

     /**
      * <desc>
      *     根据查询条件获取用户列表。
      * <desc/>
      *
      * @param  pageDTO 请求参数
      * @return
      * @author shengen.T
      * @createDate 2017/9/21
      */
     @RequestMapping(path = "/appUser/userManage/getUserInfoPage",method = RequestMethod.POST)
     Page<OperateUserManageVO> getUserInfoPage(@RequestBody OperateUserManagePageDTO pageDTO) throws Exception;


      /**
       * <desc>
       *      设置用户状态—启用/禁用。
       * <desc/>
       *
       * @param userId 用户ID
       * @param status 用户状态
       * @return
       * @author shengen.T
       * @createDate 2017/9/22
       */
     @RequestMapping(path = "/appUser/userManage/setUserStatus/{userId}/{status}")
     boolean setUserStatus(@PathVariable(value = "userId") String userId, @PathVariable(value = "status") Integer status) throws Exception ;

     /**
      * <desc>
      *        根据查询条件查询今日/本周/本月的用户活跃度
      * </desc>
      *
      * @param timeFlag
      * @return
      * @Author Zhu.yj
      * @createDate  2019/10/31
      */
     @RequestMapping(path = "/operate/project/getActiveUser")
     OperateActiveUserVO getActiveUser(@RequestParam("timeFlag") String timeFlag ,
                                       @RequestParam("searchTime") String searchTime,
                                       @RequestParam("userId") String userId) throws Exception;

     /**
      * <desc>
      *        查询注册用户量
      * </desc>
      *
      * @param
      * @return
      * @Author Zhu.yj
      * @createDate  2019/11/1
      */
     @RequestMapping(path = "/operate/appUser/getPageCount")
     String getPageCount()throws Exception;
}
